import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AppProductListComponent } from "./app-product-list/app-product-list.component";
import { MenuComponent  } from "./menu/menu.component";
import { CartComponent } from "./cart/cart.component";
import { MyComponent } from "./my/my.component";
import { ProductDetailComponent  } from "./product-detail/product-detail.component";

const routes: Routes = [
  {path: 'products', component: AppProductListComponent},
  {path: 'menu', component: MenuComponent},
  {path: 'cart', component: CartComponent},
  {path: 'my', component: MyComponent},
  {path: 'detail/:id', component: ProductDetailComponent}
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
